package gatperdut.chato.constants;

public final class CSConstantsMovement {

    public static enum Direction {
        NORTH("north", "to the north", "from the north", "leading north"), SOUTH("south", "to the south", "from the south", "leading south"), EAST("east",
                "to the east", "from the east", "leading east"), WEST("west", "to the west", "from the west", "leading west"), UP("up", "upward", "from above",
                "leading upward"), DOWN("down", "downward", "from below", "leading downward");

        private final String asString;

        private final String asMovement;

        private final String asOrigin;

        private final String asDoor;

        private Direction( String asString, String asMovement, String asOrigin, String asDoor ) {
            this.asString = asString;
            this.asMovement = asMovement;
            this.asOrigin = asOrigin;
            this.asDoor = asDoor;
        }

        public String getAsString() {
            return asString;
        }

        public String getAsMovement() {
            return asMovement;
        }

        public String getAsOrigin() {
            return asOrigin;
        }

        public String getAsDoor() {
            return asDoor;
        }
    };

    public static Direction getOpposite( Direction direction ) {
        switch ( direction ) {
        case NORTH:
            return Direction.SOUTH;
        case EAST:
            return Direction.WEST;
        case SOUTH:
            return Direction.NORTH;
        case WEST:
            return Direction.EAST;
        case UP:
            return Direction.DOWN;
        case DOWN:
            return Direction.UP;
        }

        return null;
    }

}
